﻿<%@ Page Language="C#" MasterPageFile="~/LTR/MlyLtrMaster.Master" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="MLY.LTR._default"
  Title='<%$Dict:default.title%>' %>
<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>    
    
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="titleHolder">
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="SC_Graph SC_CurrentActivityGraph SC_FloatRight">
    <div class="SC_GraphHeader SC_Align">
        <asp:Literal ID="SuppliersGraphTitle" runat="server" Text="Current activity"></asp:Literal>
    </div>
    <div class="SC_GraphInside">
      
       <asp:Chart ID="CurrentActivityChart" runat="server" Width="400" Height="340" ImageLocation="~/Images/ChartsJunk" 
            ImageStorageMode="UseImageLocation" ImageType="Png">
            <%--<Titles>
                <asp:Title Name="Title1" Text="Current activity" Alignment="TopCenter" Font="Arial, 12px, style=Bold"></asp:Title>
            </Titles>--%>
            <Legends>
                <asp:Legend IsTextAutoFit="true" Name="Default" Font="Arial, 12px, style=Bold"
                 Docking="Top" Alignment="Far" TableStyle="Wide" IsDockedInsideChartArea="true" DockedToChartArea="NotSet" ></asp:Legend>                
            </Legends>
            <Series>
                <asp:Series Name="Open" ChartType="Column" IsValueShownAsLabel="true" Color="#00A9EC" >
                </asp:Series>                
                <asp:Series Name="Material" ChartType="Column" Color="#87888D" IsValueShownAsLabel="true">
                
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea  Name="ChartArea1" BackColor="White" ShadowColor="Transparent">
                    <axisy linecolor="64, 64, 64, 64" IsLabelAutoFit="False" Interval="Auto" IsLogarithmic="true" >
						<labelstyle font="Arial, 8.25pt" />
						<MajorGrid Enabled="false" />
						
					</axisy>
					<axisx linecolor="64, 64, 64, 64" IsLabelAutoFit="False">
						<labelstyle font="Arial, 8.25pt" IsStaggered="false" />
						<majorgrid Enabled="false" />
                        <%--<CustomLabels>
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_GoalKeepersAxisXTitle %>" FromPosition="0.5" ToPosition="1.5" />
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_DefenceAxisXTitle %>" FromPosition="1.5" ToPosition="2.5" />
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_MidfieldAxisXTitle %>" FromPosition="2.5" ToPosition="3.5" />
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_AttackAxisXTitle %>" FromPosition="3.5" ToPosition="4.5" />
                        </CustomLabels>--%>
					</axisx>                    
				</asp:ChartArea>
            </ChartAreas>
        </asp:Chart> 
        
    </div>
    </div>
    <div class="SC_Graph SC_FloatRight SC_AlertsArea">
    <div class="SC_GraphHeader SC_Align">
        <asp:Literal ID="AlertsHeaderTitle" runat="server" Text="Alerts"></asp:Literal>
    </div>
    <div class="SC_AlertsGraphInside">
    <div class="SC_FloatRight SC_AlertsRepeaterArea">
        <asp:Repeater ID="AlertsRepeater" runat="server" DataSourceID="AlertsRepeaterDataSource">
        <ItemTemplate>
            <asp:Label ID="AlertTitleLabel" runat="server" CssClass="SC_RedTitle" Text='<%# Eval("AlertName") %>'></asp:Label>
            <br />
            <asp:Label ID="AlertDateLabel" runat="server" Text='<%# Eval("Date") %>'></asp:Label>
            <br />
            <asp:Label ID="AlertTextLabel" runat="server" Text='<%# Eval("ContractorWorkOrderNumber") + " " + Eval("Remarks") %>'></asp:Label>
            
        </ItemTemplate>
        <SeparatorTemplate><br /></SeparatorTemplate>
        </asp:Repeater>
        <asp:SqlDataSource ID="AlertsRepeaterDataSource" runat="server" SelectCommandType="StoredProcedure"
            ConnectionString="<%$ ConnectionStrings:MLYConnectionString %>" 
            SelectCommand="SCCover_DefaultAlertsList"></asp:SqlDataSource> 
    </div>
    <div class="SC_FloatRight SC_AlertsGraphArea">
        <div class="SC_FloatRight SC_AlertsGraphDaysPart">
            <asp:Chart ID="Alerts1015Chart" runat="server" Width="100" Height="140" ImageLocation="~/Images/ChartsJunk/1" 
             ImageStorageMode="UseImageLocation" ImageType="Png">
             <ChartAreas>
                <asp:ChartArea Name="ChartArea1" BackColor="White" ShadowColor="Transparent">
                <AxisX Enabled="False" Minimum="0.5" Maximum="1.5" >
                    <MajorGrid Enabled="false" />
                    
                    <CustomLabels>
                        <asp:CustomLabel ForeColor="White" Text="" FromPosition="0.5" ToPosition="1.5" />
                    </CustomLabels>
                </AxisX>
                <AxisY Enabled="False">
                    <MajorGrid Enabled="false" />
                </AxisY>
                </asp:ChartArea>
             </ChartAreas>
            </asp:Chart>
            <div class="SC_AlertsAreaDaysNumDiv">
                11+ days
            </div>
            <div class="SC_AlertsAreaTotalsDiv">
                <asp:Literal ID="Totals1015Literal" runat="server"></asp:Literal> 
                <asp:Label ID="Totals1015Label" runat="server" CssClass="SC_RedCriticalLabel"></asp:Label>
            </div> 
        </div>
        <div class="SC_FloatRight SC_AlertsGraphDaysPart">
             <asp:Chart ID="Alerts610Chart" runat="server" Width="100" Height="140" ImageLocation="~/Images/ChartsJunk/2" 
             ImageStorageMode="UseImageLocation" ImageType="Png">
             <ChartAreas>
                <asp:ChartArea Name="ChartArea1" BackColor="White" ShadowColor="Transparent">
                <AxisX Enabled="False" Minimum="0.5" Maximum="1.5" >
                    <MajorGrid Enabled="false" />
                    
                    <CustomLabels>
                        <asp:CustomLabel ForeColor="White" Text="" FromPosition="0.5" ToPosition="1.5" />
                    </CustomLabels>
                </AxisX>
                <AxisY Enabled="False">
                    <MajorGrid Enabled="false" />
                </AxisY>
                </asp:ChartArea>
             </ChartAreas>
            </asp:Chart>
            <div class="SC_AlertsAreaDaysNumDiv">
                6 - 10 days
            </div>
            <div class="SC_AlertsAreaTotalsDiv">
                <asp:Literal ID="Totals610Literal" runat="server"></asp:Literal> 
                <asp:Label ID="Totals610Label" runat="server" CssClass="SC_RedCriticalLabel"></asp:Label>
            </div> 
        </div>
        <div class="SC_FloatRight SC_AlertsGraphDaysPart">
             <asp:Chart ID="Alerts05Chart" runat="server" Width="100" Height="140" ImageLocation="~/Images/ChartsJunk/3" 
             ImageStorageMode="UseImageLocation" ImageType="Png">
             <ChartAreas>
                <asp:ChartArea Name="ChartArea1" BackColor="White" ShadowColor="Transparent">
                <AxisX Enabled="False" Minimum="0.5" Maximum="1.5" >
                    <MajorGrid Enabled="false" />
                    
                    <CustomLabels>
                        <asp:CustomLabel ForeColor="White" Text="" FromPosition="0.5" ToPosition="1.5" />
                    </CustomLabels>
                </AxisX>
                <AxisY Enabled="False">
                    <MajorGrid Enabled="false" />
                </AxisY>
                </asp:ChartArea>
             </ChartAreas>
            </asp:Chart>
            <div class="SC_AlertsAreaDaysNumDiv">
                0 - 5 days
            </div>
            <div class="SC_AlertsAreaTotalsDiv">
                <asp:Literal ID="Totals05Literal" runat="server"></asp:Literal> 
                <asp:Label ID="Totals05Label" runat="server" CssClass="SC_RedCriticalLabel"></asp:Label>
            </div> 
        </div>
        <div class="SC_FloatRight SC_AlertsListArea">
            <asp:Repeater ID="AlertsListRepeater" runat="server" DataSourceID="AlertsListDataSource">
            
            <ItemTemplate>
                <div class="SC_FloatLeft SC_AlertNamePadding">
                    <asp:Literal ID="Color" runat="server" Text='<%# ReturnAlertColorDiv() %>'></asp:Literal>
                    <asp:Label ID="AlertNameLabel" runat="server" Text='<%# Eval("AlertName") %>'></asp:Label>
                </div>
            </ItemTemplate>
            </asp:Repeater>
            
        </div>
        <asp:SqlDataSource ID="AlertsListDataSource" runat="server" SelectCommandType="StoredProcedure"
        ConnectionString="<%$ ConnectionStrings:MLYConnectionString %>" 
        SelectCommand="AlertGetUserAlerts"></asp:SqlDataSource> 
    </div>
    </div>            
    </div>
    <div class="clr"></div>
    
    <div class="SC_BottomGraph SC_FloatRight">
    <div class="SC_BottomGraphInside">
        <div id="uploadpercent" class="SC_FloatRight">
            <asp:FormView ID="UploadPercentFormVlew" runat="server" DataSourceID="UploadPercentDataSource">
                <ItemTemplate>
                    <div class="SC_bottom_r">
                        <h3>Upload Percent</h3>
                        <div><span><asp:Literal ID="PercentLiteral" runat="server" Text='<%# Eval("Result") %>'></asp:Literal><em>%</em></span></div>
                        <span><a href="#">Delay Orders</a></span>
                    </div>
                </ItemTemplate>
            </asp:FormView>
            <div class="SC_bottom_r SC_SmallText SC_Align">                
                <asp:Label ID="LastOrganizationalUpload" runat="server"></asp:Label>
            </div>
            <asp:SqlDataSource ID="UploadPercentDataSource" runat="server" SelectCommandType="StoredProcedure"
                ConnectionString="<%$ ConnectionStrings:MLYConnectionString %>" 
                SelectCommand="SCCover_GetUploadPercent"></asp:SqlDataSource>
        </div>
        <div id="ontimedelivery" class="SC_FloatRight">
            <div class="SC_middle">
                <h3><asp:HyperLink ID="OnTimeDeliveryLink" runat="server" NavigateUrl="~/Reports/AdvReportsViewer.aspx?ReportName=OTDYield"
                 Text="<%$ Dict:Report.OnTimeDelivery %>" CssClass="defaultlink"></asp:HyperLink></h3>
            </div>
            <asp:Repeater ID="onTimeDeliveryRepeater" runat="server" DataSourceID="OnTimeDeliveryDataSource"
             OnItemDataBound="LoadOnTimeDeliveryChart">
            <ItemTemplate>
                <asp:HiddenField ID="DataHiddenField" runat="server" Value='<%# Eval("Percentage") %>' />
                <div class="SC_FloatRight SC_onTimeDeliveryRepeaterItem">
                    <div id="ontimedeliverychartdiv">
                        <asp:Chart ID="OnTimeDeliveryChart" runat="server" ImageLocation="~/Images/ChartsJunk/4" 
                            ImageStorageMode="UseHttpHandler" ImageType="Png" Height="80" Width="80">
                        <Series>
                        <asp:Series Name="DougnutSeries" ChartType="Doughnut">  
                        <Points>
                        </Points>                      
                        </asp:Series>
                        
                        </Series>
                        <ChartAreas>
                        <asp:ChartArea Name="ChartArea1" BackColor="Transparent"></asp:ChartArea>
                        </ChartAreas>
                        </asp:Chart>
                        
                         <div class="SC_OnTimeGraphInside">
                            <asp:Literal ID="PercentageLitetal" runat="server"></asp:Literal>
                        </div>
                        <div class="SC_OnTimeGraphOrgName">
                            <asp:Literal ID="OrgNameLiteral" runat="server" 
                                Text='<%# Eval("orgName") %>'></asp:Literal>
                        </div>
                    </div>
                    <%--<div class="SC_ChartBackground">
                        <asp:Literal ID="PercentageLiteral" runat="server" 
                        Text='<%# Eval("Percentage").ToString() + "%" %>'></asp:Literal>
                    </div>--%>
                    
                    
                </div>
            </ItemTemplate>
            </asp:Repeater>
            <asp:SqlDataSource ID="OnTimeDeliveryDataSource" runat="server" SelectCommandType="StoredProcedure"
                ConnectionString="<%$ ConnectionStrings:MLYConnectionString %>" 
                SelectCommand="SCCover_OnTimeDeliveryData"></asp:SqlDataSource>
        </div>
        <div id="SuppliersYield" class="SC_FloatLeft">
            <div class="bottom_l">
              <h3><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Reports/AdvReportsViewer.aspx?ReportName=OTDYield"
                 Text="<%$ Dict:Report.SuppliersYield %>" CssClass="defaultlink"></asp:HyperLink></h3>
              <asp:Repeater ID="SuppliersYieldRepeater" runat="server" DataSourceID="SupplierYieldDataSource">
              <ItemTemplate>
                  <asp:Literal ID="DivLiteral" runat="server" Text='<%# YieldDivTitle(Eval("Percentage")) %>'></asp:Literal>
                    <span><asp:Literal ID="SupName" runat="server" Text='<%# Eval("orgName") %>'></asp:Literal></span>
                    <strong><asp:Literal ID="WidthLiteral" runat="server" Text='<%# YieldDivLength(Eval("Percentage")) %>'></asp:Literal></strong>
                  </div>
              </ItemTemplate>
              </asp:Repeater>
              <asp:SqlDataSource ID="SupplierYieldDataSource" runat="server" SelectCommandType="StoredProcedure"
                ConnectionString="<%$ ConnectionStrings:MLYConnectionString %>" 
                SelectCommand="SCCover_SupplierYield"></asp:SqlDataSource>
              <%--<div>
                <span>Sup Name1</span>
                <strong><em style="width:78%;">78%</em></strong>
              </div>
              <div>
                <span>Sup Name2</span>
                <strong><em style="width:85%;">85%</em></strong>
              </div>
              <div class="red">
                <span>Sup Name3</span>
                <strong><em style="width:35%;">35%</em></strong>
              </div>
              <div>
                <span>Sup Name4</span>
                <strong><em style="width:98%;">98%</em></strong>
              </div>--%>
            </div>
        </div>
    </div>        
    </div>

   <%-- <div id="mainTbl" class="floater">
    
    <table id="DefaultMainTable" border="0" cellpadding="0" cellspacing="0" >
      <tr>
        <th class="aligncenter">
          <asp:HyperLink runat="server" Width="208" ID="HyperLink1" NavigateUrl="/LTR/contractorSearch2.aspx" Text='<%$Dict:default.SearchContractorsEngine%>'></asp:HyperLink>
        </th>
        <th class="aligncenter">
          <img src="/Images/main/line_division_for-title.jpg" alt=""/>
        </th>
        <th class="aligncenter">
          <asp:HyperLink runat="server" Width="215" ID="HyperLink2" NavigateUrl="/Reports/advancedRptParams.aspx" Text='<%$Dict:default.AdvancedReports%>'></asp:HyperLink>
        </th>
        <th class="aligncenter">
          <img src="/Images/main/line_division_for-title.jpg" alt="" />
        </th>
        <th class="aligncenter">
          <asp:HyperLink runat="server" Width="205" ID="HyperLinkOrgDetails" NavigateUrl="~/LTR/OrgInfo.aspx" Text='<%$Dict:default.OrganizationDetails%>'></asp:HyperLink>
        </th>
        <th class="aligncenter">
          <img src="/Images/main/line_division_for-title.jpg" alt="" />
        </th>
        <th class="aligncenter">
          <asp:HyperLink runat="server" Width="178" ID="HyperLink4" NavigateUrl="~/LTR/UserInfo.aspx" Text='<%$Dict:default.UserDetails%>'></asp:HyperLink>
        </th>
      </tr>
    </table>
  </div>--%>
</asp:Content>
